package com.bootdo.system.dao;

import com.bootdo.system.domain.UserDO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;

/**
 * 
 * @author huizhang
 * @date 2017-10-03 09:45:11
 */
@Mapper
public interface UserDao {

	UserDO get(Long userId);

	/**
	 * 根据手机号获取用户信息
	 *
	 * @param mobile 手机号
	 * @return 返回用户信息
	 */
	UserDO getByMobile(String mobile);
	
	List<UserDO> list(Map<String,Object> map);
	
	int count(Map<String,Object> map);
	
	int save(UserDO user);
	
	int update(UserDO user);
	
	int remove(Long userId);
	
	int batchRemove(Long[] userIds);
	
	Long[] listAllDept();

    UserDO getUserDetail(Map<String, Object> map);

    void addIntegral(UserDO fromUserDO);

	void reduceIntegral(UserDO toUserDO);
}
